home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Pictures / TIFF / Tiff Utilties / Tiff Window DEMO / my color.h < prev    next >
Text File  |  1990-04-23  |  3KB  |  112 lines

  1.  
  2. #include <mactypes.h>
  3. #include <color.h>
  4. #include <colortoolbox.h>
  5. #include <Quickdraw.h>
  6. #include <FontMgr.h>
  7. #include <EventMgr.h>
  8. #include <ControlMgr.h>
  9. #include <WindowMgr.h>
  10. #include <MenuMgr.h>
  11. #include <TextEdit.h>
  12. #include <DialogMgr.h>
  13. #include <DeskMgr.h>
  14. #include <ToolboxUtil.h>
  15. #include <ScrapMgr.h> 
  16.  
  17.  
  18. /*==================================================================*/
  19. /*                Defines Added To Make Compatible With LightSpeed C    */
  20. /*==================================================================*/
  21. #define NULL     0L         /* The value of a pointer pointing to nothing     */
  22. #define    nil        NULL    /* Define constant NIL to equal the C NULL pointer */
  23.                         /* to retain Pascal calling conventions     */
  24.                         /* of "Inside Mac" documentation  */
  25.  
  26. /*==================================================================*/
  27.  
  28. /*resource IDs/menu IDs for Apple, File and Edit menus*/
  29. #define        appleID        128    
  30. #define        fileID        129
  31. #define        editID        130
  32. #define        colorID        131
  33. #define        controlID    132
  34.  
  35. /*index for each menu in myMenus (array of menu handles, 0-based in C!!!!)*/
  36. #define        appleM  0    
  37. #define        fileM   1
  38. #define        editM   2
  39. #define        colorM    3
  40. #define        CcolorM    4
  41.  
  42. /*total number of menus*/
  43. #define        menuCount  5            
  44.  
  45. /*item in Apple menu*/
  46. #define        aboutItem  1            
  47.         
  48. /*Items in Edit menu*/
  49. #define        undoItem   1            
  50. #define        cutItem    3
  51. #define        copyItem   4
  52. #define        pasteItem  5
  53. #define        clearItem  6
  54.         
  55. /*items in File menu*/
  56. #define        newItem  1            
  57. #define        closeItem  3
  58. #define        quitItem  5
  59.  
  60. /* items in the color menu */
  61. #define    CONTENT    1
  62. #define    FRAME    2
  63. #define    TEXT    3
  64. #define    HILITE    4
  65. #define    TITLE    5
  66.  
  67. /* items in the Color Control Menu */
  68. #define    cFRAME    1
  69. #define    cBODY    2
  70. #define    cTEXT    3
  71. #define    cTHUMB    4
  72.         
  73. /*default name for windows */
  74. #define        WindName "Empty Window "
  75.  
  76. /*distance to move for new windows*/
  77. #define        windDX  25                
  78. #define        windDY  25
  79.         
  80. /*initial dimensions of window*/
  81. #define        leftEdge    10            
  82. #define        topEdge        42
  83. #define        rightEdge    310
  84. #define        botEdge        275
  85.  
  86. #define ABOUT_BOX            1000
  87.  
  88. #define ONE_PIXEL            0
  89. #define    BAR_WIDTH            15
  90. #define    HORIZONTAL_SCROLL    10
  91. #define    VERTICLE_SCROLL        20
  92.  
  93. extern    MenuHandle    myMenus[menuCount];    /*handles to the menus*/
  94. extern    Rect        dragRect;             /*rectangle used to mark boundaries for dragging window*/
  95. extern    Rect        screenRect;            /*to hold screenbits.bounds */
  96. extern    Rect        txRect;                /*rectangle for text in application window*/
  97. extern    TEHandle    textH;                /*handle to Textedit record*/
  98. extern    Boolean        extendedCH;            /*true if user is Shift-clicking*/
  99. extern    Boolean        doneFlag;            /*true if user has chosen Quit Item*/
  100. extern    EventRecord    myEvent;            /*information about an event*/
  101. extern    CWindowRecord    wRecord;        /*information about the application window*/
  102. extern    CWindowPtr    myWindow;            /*pointer to wRecord*/
  103. extern    CWindowPeek    myWinPeek;            /*another pointer to wRecord*/
  104. extern    CWindowPtr    whichWindow;        /*window in which mouse button was pressed*/
  105. extern    Rect        nextWRect ;            /*portRect for next window to be opended*/
  106. extern    long        nextWNum;            /*number of next window (for title)*/
  107. extern    CGrafPtr    savedPort;            /*pointer to preserve GrafPort*/
  108. extern    Boolean        menusOK;            /*for disabling menu items*/
  109. extern    long        scrapErr;
  110. extern    short        scrCopyErr;
  111.  
  112.